package bbs.mappers;


import bbs.entity.dto.FollowDto;
import bbs.entity.po.Follow;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;

import java.util.List;

public interface FollowMapper<T,P> extends BaseMapper<T, P>{

    @Insert("insert into user_follower(user_id, follower_id) values(#{userId},#{followId})")
    void addFollow(String userId, String followId);


    @Delete("delete from user_follower where follower_id = #{followId}")
    void cancelFollow(String followId);

    Integer followFlag(String userId, String followId);

    List<Follow> followList(String followId);

    List<FollowDto> userList(String userId);
}
